home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / FLEX-TC_ / MAIN.C < prev    next >
C/C++ Source or Header  |  1990-01-03  |  17KB  |  687 lines

  1. /* flex - tool to generate fast lexical analyzers
  2.  *
  3.  *
  4.  * Copyright (c) 1989 The Regents of the University of California.
  5.  * All rights reserved.
  6.  *
  7.  * This code is derived from software contributed to Berkeley by
  8.  * Vern Paxson.
  9.  *
  10.  * The United States Government has rights in this work pursuant to
  11.  * contract no. DE-AC03-76SF00098 between the United States Department of
  12.  * Energy and the University of California.
  13.  *
  14.  * Redistribution and use in source and binary forms are permitted
  15.  * provided that the above copyright notice and this paragraph are
  16.  * duplicated in all such forms and that any documentation,
  17.  * advertising materials, and other materials related to such
  18.  * distribution and use acknowledge that the software was developed
  19.  * by the University of California, Berkeley.  The name of the
  20.  * University may not be used to endorse or promote products derived
  21.  * from this software without specific prior written permission.
  22.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  23.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  24.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  25.  *
  26.  */
  27.  
  28. #ifdef THINK_C
  29. #include <console.h>
  30. #endif
  31.  
  32. #ifndef lint
  33.  
  34. static char copyright[] =
  35. "@(#) Copyright (c) 1989 The Regents of the University of California.\n";
  36. static char CR_continuation[] = "@(#) All rights reserved.\n";
  37.  
  38. static char rcsid[] =
  39. "@(#) $Header: main.c,v 2.2 89/06/20 16:36:26 vern Exp $ (LBL)";
  40.  
  41. #endif
  42.  
  43.  
  44. #include "flexdef.h"
  45.  
  46. static char flex_version[] = "2.1 (beta)";
  47.  
  48.  
  49. /* these globals are all defined and commented in flexdef.h */
  50. int printstats, syntaxerror, eofseen, ddebug, trace, spprdflt;
  51. int interactive, caseins, useecs, fulltbl, usemecs;
  52. int fullspd, gen_line_dirs, performance_report, backtrack_report;
  53. int yymore_used, reject, real_reject, continued_action;
  54. int yymore_really_used, reject_really_used;
  55. int datapos, dataline, linenum;
  56. FILE *skelfile = NULL;
  57. char *infilename = NULL;
  58. int onestate[ONE_STACK_SIZE], onesym[ONE_STACK_SIZE];
  59. int onenext[ONE_STACK_SIZE], onedef[ONE_STACK_SIZE], onesp;
  60. int current_mns, num_rules, current_max_rules, lastnfa;
  61. int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
  62. int *accptnum, *assoc_rule, *state_type, *rule_type, *rule_linenum;
  63. int current_state_type;
  64. int variable_trailing_context_rules;
  65. int numtemps, numprots, protprev[MSP], protnext[MSP], prottbl[MSP];
  66. int protcomst[MSP], firstprot, lastprot, protsave[PROT_SAVE_SIZE];
  67. int numecs, nextecm[CSIZE + 1], ecgroup[CSIZE + 1], nummecs, tecfwd[CSIZE + 1];
  68. int tecbck[CSIZE + 1];
  69. int lastsc, current_max_scs, *scset, *scbol, *scxclu, *sceof, *actvsc;
  70. char **scname;
  71. int current_max_dfa_size, current_max_xpairs;
  72. int current_max_template_xpairs, current_max_dfas;
  73. int lastdfa, *nxt, *chk, *tnxt;
  74. int *base, *def, tblend, firstfree, **dss, *dfasiz;
  75. union dfaacc_union *dfaacc;
  76. int *accsiz, *dhash, numas;
  77. int numsnpairs, jambase, jamstate;
  78. int lastccl, current_maxccls, *cclmap, *ccllen, *cclng, cclreuse;
  79. int current_max_ccl_tbl_size;
  80. char *ccltbl;
  81. char *starttime, *endtime, nmstr[MAXLINE];
  82. int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
  83. int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
  84. int num_backtracking, bol_needed;
  85. FILE *temp_action_file;
  86. FILE *backtrack_file;
  87. int end_of_buffer_state;
  88. #ifdef THINK_C
  89. char action_file_name[FILENAME_MAX];
  90. #else
  91. #ifndef SHORT_FILE_NAMES
  92. char action_file_name[] = "/tmp/flexXXXXXX";
  93. #else
  94. char action_file_name[] = "flexXXXXXX.tmp";
  95. #endif
  96. #endif
  97.  
  98. #ifndef SHORT_FILE_NAMES
  99. static char outfile[] = "lex.yy.c";
  100. #else
  101. static char outfile[] = "lexyy.c";
  102. #endif
  103. static int outfile_created = 0;
  104.  
  105.  
  106. /* flex - main program
  107.  *
  108.  * synopsis (from the shell)
  109.  *      flex [-v] [file ...]
  110.  */
  111.  
  112. main( argc, argv )
  113. int argc;
  114. char **argv;
  115.  
  116. {
  117. #ifdef THINK_C
  118.     argc = ccommand (&argv);
  119. #endif
  120.  
  121.     flexinit( argc, argv );
  122.  
  123.     readin();
  124.  
  125.     if ( syntaxerror )
  126.         flexend( 1 );
  127.  
  128.     if ( yymore_really_used == REALLY_USED )
  129.         yymore_used = true;
  130.     else
  131.         if ( yymore_really_used == REALLY_NOT_USED )
  132.             yymore_used = false;
  133.  
  134.     if ( reject_really_used == REALLY_USED )
  135.         reject = true;
  136.     else
  137.         if ( reject_really_used == REALLY_NOT_USED )
  138.             reject = false;
  139.  
  140.     if ( performance_report )
  141.     {
  142.         if ( yymore_used )
  143.             fprintf( stderr,
  144.             "yymore() entails a minor performance penalty\n" );
  145.  
  146.         if ( interactive )
  147.             fprintf( stderr,
  148.             "-I (interactive) entails a minor performance penalty\n" );
  149.  
  150.         if ( reject )
  151.             fprintf( stderr,
  152.             "REJECT entails a large performance penalty\n" );
  153.  
  154.         if ( variable_trailing_context_rules )
  155.             fprintf( stderr,
  156.             "Variable trailing context rules entail a large performance penalty\n" );
  157.     }
  158.  
  159.     if ( reject )
  160.         real_reject = true;
  161.  
  162.     if ( variable_trailing_context_rules )
  163.         reject = true;
  164.  
  165.     if ( (fulltbl || fullspd) && reject )
  166.     {
  167.         if ( real_reject )
  168.             flexerror( "REJECT cannot be used with -f or -F" );
  169.         else
  170.             flexerror(
  171.             "variable trailing context rules cannot be used with -f or -F" );
  172.     }
  173.  
  174.     /* convert the ndfa to a dfa */
  175.     ntod();
  176.  
  177.     /* generate the C state transition tables from the DFA */
  178.     make_tables();
  179.  
  180.     /* note, flexend does not return.  It exits with its argument as status. */
  181.  
  182.     flexend( 0 );
  183.  
  184.     /*NOTREACHED*/
  185. }
  186.  
  187.  
  188. /* flexend - terminate flex
  189.  *
  190.  * synopsis
  191.  *      int status;
  192.  *      flexend( status );
  193.  *
  194.  *      status is exit status.
  195.  *
  196.  * note
  197.  *      This routine does not return.
  198.  */
  199.  
  200. flexend( status )
  201. int status;
  202.  
  203. {
  204.     int tblsiz;
  205.     char *flex_gettime();
  206.  
  207.     if ( skelfile != NULL )
  208.         (void) fclose( skelfile );
  209.  
  210.     if ( temp_action_file )
  211.     {
  212.         (void) fclose( temp_action_file );
  213.         (void) unlink( action_file_name );
  214.     }
  215.  
  216.     if ( status != 0 && outfile_created )
  217.     {
  218.         (void) fclose( stdout );
  219.         (void) unlink( outfile );
  220.     }
  221.  
  222.     if ( backtrack_report )
  223.     {
  224.         if ( num_backtracking == 0 )
  225.             fprintf( backtrack_file, "No backtracking.\n" );
  226.         else
  227.             if ( fullspd || fulltbl )
  228.                 fprintf( backtrack_file,
  229.                 "%d backtracking (non-accepting) states.\n",
  230.                 num_backtracking );
  231.         else
  232.             fprintf( backtrack_file, "Compressed tables always backtrack.\n" );
  233.  
  234.         (void) fclose( backtrack_file );
  235.     }
  236.  
  237.     if ( printstats )
  238.     {
  239.         endtime = flex_gettime();
  240.  
  241.         fprintf( stderr, "flex version %s usage statistics:\n", flex_version );
  242.         fprintf( stderr, "  started at %s, finished at %s\n",
  243.         starttime, endtime );
  244.  
  245.         fprintf( stderr, "  %d/%d NFA states\n", lastnfa, current_mns );
  246.         fprintf( stderr, "  %d/%d DFA states (%d words)\n", lastdfa,
  247.         current_max_dfas, totnst );
  248.         fprintf( stderr, "  %d rules\n", num_rules - 1 /* - 1 for def. rule */ );
  249.  
  250.         if ( num_backtracking == 0 )
  251.             fprintf( stderr, "  No backtracking\n" );
  252.         else
  253.             if ( fullspd || fulltbl )
  254.                 fprintf( stderr, "  %d backtracking (non-accepting) states\n",
  255.                 num_backtracking );
  256.         else
  257.             fprintf( stderr, "  compressed tables always backtrack\n" );
  258.  
  259.         if ( bol_needed )
  260.             fprintf( stderr, "  Beginning-of-line patterns used\n" );
  261.  
  262.         fprintf( stderr, "  %d/%d start conditions\n", lastsc,
  263.         current_max_scs );
  264.         fprintf( stderr, "  %d epsilon states, %d double epsilon states\n",
  265.         numeps, eps2 );
  266.  
  267.         if ( lastccl == 0 )
  268.             fprintf( stderr, "  no character classes\n" );
  269.         else
  270.             fprintf( stderr,
  271.             "  %d/%d character classes needed %d/%d words of storage, %d reused\n",
  272.             lastccl, current_maxccls,
  273.             cclmap[lastccl] + ccllen[lastccl],
  274.             current_max_ccl_tbl_size, cclreuse );
  275.  
  276.         fprintf( stderr, "  %d state/nextstate pairs created\n", numsnpairs );
  277.         fprintf( stderr, "  %d/%d unique/duplicate transitions\n",
  278.         numuniq, numdup );
  279.  
  280.         if ( fulltbl )
  281.         {
  282.             tblsiz = lastdfa * numecs;
  283.             fprintf( stderr, "  %d table entries\n", tblsiz );
  284.         }
  285.  
  286.         else
  287.         {
  288.             tblsiz = 2 * (lastdfa + numtemps) + 2 * tblend;
  289.  
  290.             fprintf( stderr, "  %d/%d base-def entries created\n",
  291.             lastdfa + numtemps, current_max_dfas );
  292.             fprintf( stderr, "  %d/%d (peak %d) nxt-chk entries created\n",
  293.             tblend, current_max_xpairs, peakpairs );
  294.             fprintf( stderr,
  295.             "  %d/%d (peak %d) template nxt-chk entries created\n",
  296.             numtemps * nummecs, current_max_template_xpairs,
  297.             numtemps * numecs );
  298.             fprintf( stderr, "  %d empty table entries\n", nummt );
  299.             fprintf( stderr, "  %d protos created\n", numprots );
  300.             fprintf( stderr, "  %d templates created, %d uses\n",
  301.             numtemps, tmpuses );
  302.         }
  303.  
  304.         if ( useecs )
  305.         {
  306.             tblsiz = tblsiz + CSIZE;
  307.             fprintf( stderr, "  %d/%d equivalence classes created\n",
  308.             numecs, CSIZE );
  309.         }
  310.  
  311.         if ( usemecs )
  312.         {
  313.             tblsiz = tblsiz + numecs;
  314.             fprintf( stderr, "  %d/%d meta-equivalence classes created\n",
  315.             nummecs, CSIZE );
  316.         }
  317.  
  318.         fprintf( stderr, "  %d (%d saved) hash collisions, %d DFAs equal\n",
  319.         hshcol, hshsave, dfaeql );
  320.         fprintf( stderr, "  %d sets of reallocations needed\n", num_reallocs );
  321.         fprintf( stderr, "  %d total table entries needed\n", tblsiz );
  322.     }
  323.  
  324. #ifndef VMS
  325.     exit( status );
  326. #else
  327.     exit( status + 1 );
  328. #endif
  329. }
  330.  
  331.  
  332. /* flexinit - initialize flex
  333.  *
  334.  * synopsis
  335.  *      int argc;
  336.  *      char **argv;
  337.  *      flexinit( argc, argv );
  338.  */
  339.  
  340. flexinit( argc, argv )
  341. int argc;
  342. char **argv;
  343.  
  344. {
  345.     int i, sawcmpflag, use_stdout;
  346. #ifdef THINK_C
  347.     char *arg, *skelname = NULL, *flex_gettime(), clower();
  348. #else
  349.     char *arg, *skelname = NULL, *flex_gettime(), clower(), *mktemp();
  350. #endif
  351.  
  352.     printstats = syntaxerror = trace = spprdflt = interactive = caseins = false;
  353.     backtrack_report = performance_report = ddebug = fulltbl = fullspd = false;
  354.     yymore_used = continued_action = reject = false;
  355.     yymore_really_used = reject_really_used = false;
  356.     gen_line_dirs = usemecs = useecs = true;
  357.  
  358.     sawcmpflag = false;
  359.     use_stdout = false;
  360.  
  361.     /* read flags */
  362.     for ( --argc, ++argv; argc ; --argc, ++argv )
  363.     {
  364.         if ( argv[0][0] != '-' || argv[0][1] == '\0' )
  365.             break;
  366.  
  367.         arg = argv[0];
  368.  
  369.         for ( i = 1; arg[i] != '\0'; ++i )
  370.             switch ( arg[i] )
  371.             {
  372.                 case 'b':
  373.                     backtrack_report = true;
  374.                     break;
  375.  
  376.                 case 'c':
  377.                     if ( i != 1 )
  378.                         flexerror( "-c flag must be given separately" );
  379.  
  380.                     if ( ! sawcmpflag )
  381.                     {
  382.                         useecs = false;
  383.                         usemecs = false;
  384.                         fulltbl = false;
  385.                         sawcmpflag = true;
  386.                     }
  387.  
  388.                     for ( ++i; arg[i] != '\0'; ++i )
  389.                         switch ( clower( arg[i] ) )
  390.                         {
  391.                             case 'e':
  392.                                 useecs = true;
  393.                                 break;
  394.  
  395.                             case 'F':
  396.                                 fullspd = true;
  397.                                 break;
  398.  
  399.                             case 'f':
  400.                                 fulltbl = true;
  401.                                 break;
  402.  
  403.                             case 'm':
  404.                                 usemecs = true;
  405.                                 break;
  406.  
  407.                             default:
  408.                                 lerrif( "unknown -c option %c",
  409.                                 (int) arg[i] );
  410.                                 break;
  411.                         }
  412.  
  413.                         goto get_next_arg;
  414.  
  415.                     case 'd':
  416.                         ddebug = true;
  417.                         break;
  418.  
  419.                     case 'f':
  420.                         useecs = usemecs = false;
  421.                         fulltbl = true;
  422.                         break;
  423.  
  424.                     case 'F':
  425.                         useecs = usemecs = false;
  426.                         fullspd = true;
  427.                         break;
  428.  
  429.                     case 'I':
  430.                         interactive = true;
  431.                         break;
  432.  
  433.                     case 'i':
  434.                         caseins = true;
  435.                         break;
  436.  
  437.                     case 'L':
  438.                         gen_line_dirs = false;
  439.                         break;
  440.  
  441.                     case 'p':
  442.                         performance_report = true;
  443.                         break;
  444.  
  445.                     case 'S':
  446.                         if ( i != 1 )
  447.                             flexerror( "-S flag must be given separately" );
  448.  
  449.                         skelname = arg + i + 1;
  450.                         goto get_next_arg;
  451.  
  452.                     case 's':
  453.                         spprdflt = true;
  454.                         break;
  455.  
  456.                     case 't':
  457.                         use_stdout = true;
  458.                         break;
  459.  
  460.                     case 'T':
  461.                         trace = true;
  462.                         break;
  463.  
  464.                     case 'v':
  465.                         printstats = true;
  466.                         break;
  467.  
  468.                     default:
  469.                         lerrif( "unknown flag %c", (int) arg[i] );
  470.                         break;
  471.                 }
  472.  
  473. get_next_arg: /* used by -c and -S flags in lieu of a "continue 2" control */;
  474.             }
  475.  
  476.             if ( (fulltbl || fullspd) && usemecs )
  477.                 flexerror( "full table and -cm don't make sense together" );
  478.  
  479.             if ( (fulltbl || fullspd) && interactive )
  480.                 flexerror( "full table and -I are (currently) incompatible" );
  481.  
  482.             if ( fulltbl && fullspd )
  483.                 flexerror( "full table and -F are mutually exclusive" );
  484.  
  485.             if ( ! skelname )
  486.             {
  487.                 static char skeleton_name_storage[400];
  488.  
  489.                 skelname = skeleton_name_storage;
  490.                 (void) strcpy( skelname, DEFAULT_SKELETON_FILE );
  491.             }
  492.  
  493.             if ( ! use_stdout )
  494.             {
  495.                 FILE *prev_stdout = freopen( outfile, "w", stdout );
  496.  
  497.                 if ( prev_stdout == NULL )
  498.                     flexerror( "could not create lex.yy.c" );
  499.  
  500.                 outfile_created = 1;
  501.             }
  502.  
  503.             if ( argc )
  504.             {
  505.                 if ( argc > 1 )
  506.                     flexerror( "extraneous argument(s) given" );
  507.  
  508.                 yyin = fopen( infilename = argv[0], "r" );
  509.  
  510.                 if ( yyin == NULL )
  511.                     lerrsf( "can't open %s", argv[0] );
  512.             }
  513.  
  514.             else
  515.                 yyin = stdin;
  516.  
  517.             if ( backtrack_report )
  518.             {
  519. #ifndef SHORT_FILE_NAMES
  520.                 backtrack_file = fopen( "lex.backtrack", "w" );
  521. #else
  522.                 backtrack_file = fopen( "lex.bck", "w" );
  523. #endif
  524.  
  525.                 if ( backtrack_file == NULL )
  526.                     flexerror( "could not create lex.backtrack" );
  527.             }
  528.  
  529.             else
  530.                 backtrack_file = NULL;
  531.  
  532.  
  533.             lastccl = 0;
  534.             lastsc = 0;
  535.  
  536.             /* initialize the statistics */
  537.             starttime = flex_gettime();
  538.  
  539.             if ( (skelfile = fopen( skelname, "r" )) == NULL )
  540.                 lerrsf( "can't open skeleton file %s", skelname );
  541.  
  542. #ifdef THINK_C
  543.             (void) tmpnam (action_file_name);
  544. #else
  545.             (void) mktemp( action_file_name );
  546. #endif
  547.  
  548.             if ( (temp_action_file = fopen( action_file_name, "w" )) == NULL )
  549.                 lerrsf( "can't open temporary action file %s", action_file_name );
  550.  
  551.             lastdfa = lastnfa = num_rules = numas = numsnpairs = tmpuses = 0;
  552.             numecs = numeps = eps2 = num_reallocs = hshcol = dfaeql = totnst = 0;
  553.             numuniq = numdup = hshsave = eofseen = datapos = dataline = 0;
  554.             num_backtracking = onesp = numprots = 0;
  555.             variable_trailing_context_rules = bol_needed = false;
  556.  
  557.             linenum = sectnum = 1;
  558.             firstprot = NIL;
  559.  
  560.             /* used in mkprot() so that the first proto goes in slot 1
  561.              * of the proto queue
  562.              */
  563.             lastprot = 1;
  564.  
  565.             if ( useecs )
  566.             {
  567.                 /* set up doubly-linked equivalence classes */
  568.                 ecgroup[1] = NIL;
  569.  
  570.                 for ( i = 2; i <= CSIZE; ++i )
  571.                 {
  572.                     ecgroup[i] = i - 1;
  573.                     nextecm[i - 1] = i;
  574.                 }
  575.  
  576.                 nextecm[CSIZE] = NIL;
  577.             }
  578.  
  579.             else
  580.             { /* put everything in its own equivalence class */
  581.                 for ( i = 1; i <= CSIZE; ++i )
  582.                 {
  583.                     ecgroup[i] = i;
  584.                     nextecm[i] = BAD_SUBSCRIPT; /* to catch errors */
  585.                 }
  586.             }
  587.  
  588.             set_up_initial_allocations();
  589.         }
  590.  
  591.  
  592. /* readin - read in the rules section of the input file(s)
  593.  *
  594.  * synopsis
  595.  *      readin();
  596.  */
  597.  
  598. readin()
  599.  
  600. {
  601.     if ( ddebug )
  602.         puts( "#define FLEX_DEBUG" );
  603.  
  604.     if ( fulltbl )
  605.         puts( "#define FLEX_FULL_TABLE" );
  606.     else
  607.         if ( fullspd )
  608.             puts( "#define FLEX_FAST_COMPRESSED" );
  609.     else
  610.         puts( "#define FLEX_COMPRESSED" );
  611.  
  612.     skelout();
  613.  
  614.     line_directive_out( stdout );
  615.  
  616.     if ( yyparse() )
  617.         lerrif( "fatal parse error at line %d", linenum );
  618.  
  619.     if ( useecs )
  620.     {
  621.         numecs = cre8ecs( nextecm, ecgroup, CSIZE );
  622.         ccl2ecl();
  623.     }
  624.  
  625.     else
  626.         numecs = CSIZE;
  627.  
  628. }
  629.  
  630.  
  631.  
  632. /* set_up_initial_allocations - allocate memory for internal tables */
  633.  
  634. set_up_initial_allocations()
  635.  
  636. {
  637.     current_mns = INITIAL_MNS;
  638.     firstst = allocate_integer_array( current_mns );
  639.     lastst = allocate_integer_array( current_mns );
  640.     finalst = allocate_integer_array( current_mns );
  641.     transchar = allocate_integer_array( current_mns );
  642.     trans1 = allocate_integer_array( current_mns );
  643.     trans2 = allocate_integer_array( current_mns );
  644.     accptnum = allocate_integer_array( current_mns );
  645.     assoc_rule = allocate_integer_array( current_mns );
  646.     state_type = allocate_integer_array( current_mns );
  647.  
  648.     current_max_rules = INITIAL_MAX_RULES;
  649.     rule_type = allocate_integer_array( current_max_rules );
  650.     rule_linenum = allocate_integer_array( current_max_rules );
  651.  
  652.     current_max_scs = INITIAL_MAX_SCS;
  653.     scset = allocate_integer_array( current_max_scs );
  654.     scbol = allocate_integer_array( current_max_scs );
  655.     scxclu = allocate_integer_array( current_max_scs );
  656.     sceof = allocate_integer_array( current_max_scs );
  657.     scname = allocate_char_ptr_array( current_max_scs );
  658.     actvsc = allocate_integer_array( current_max_scs );
  659.  
  660.     current_maxccls = INITIAL_MAX_CCLS;
  661.     cclmap = allocate_integer_array( current_maxccls );
  662.     ccllen = allocate_integer_array( current_maxccls );
  663.     cclng = allocate_integer_array( current_maxccls );
  664.  
  665.     current_max_ccl_tbl_size = INITIAL_MAX_CCL_TBL_SIZE;
  666.     ccltbl = allocate_character_array( current_max_ccl_tbl_size );
  667.  
  668.     current_max_dfa_size = INITIAL_MAX_DFA_SIZE;
  669.  
  670.     current_max_xpairs = INITIAL_MAX_XPAIRS;
  671.     nxt = allocate_integer_array( current_max_xpairs );
  672.     chk = allocate_integer_array( current_max_xpairs );
  673.  
  674.     current_max_template_xpairs = INITIAL_MAX_TEMPLATE_XPAIRS;
  675.     tnxt = allocate_integer_array( current_max_template_xpairs );
  676.  
  677.     current_max_dfas = INITIAL_MAX_DFAS;
  678.     base = allocate_integer_array( current_max_dfas );
  679.     def = allocate_integer_array( current_max_dfas );
  680.     dfasiz = allocate_integer_array( current_max_dfas );
  681.     accsiz = allocate_integer_array( current_max_dfas );
  682.     dhash = allocate_integer_array( current_max_dfas );
  683.     dss = allocate_int_ptr_array( current_max_dfas );
  684.     dfaacc = allocate_dfaacc_union( current_max_dfas );
  685. }
  686.  
  687.